f3eb8cd7bf6aa528fdc03ecc05a9654026514ca9,platform/lang-impl/src/com/intellij/codeInsight/navigation/CtrlMouseHandler.java,TooltipProvider,execute,#BrowseMode#,817

Before Change


      Document document = myEditor.getDocument();
      final PsiFile file = PsiDocumentManager.getInstance(myProject).getPsiFile(document);
      if (file == null) return;
      PsiDocumentManager.getInstance(myProject).commitAllDocuments();

      if (EditorUtil.inVirtualSpace(myEditor, myPosition)) {
        disposeHighlighter();

After Change



      if (offset >= selStart && offset < selEnd) return;

      PsiDocumentManager.getInstance(myProject).performWhenAllCommitted(
        () -> ProgressIndicatorUtils.scheduleWithWriteActionPriority(myProgress, new ReadTask() {
          @Nullable
          @Override
          public Continuation performInReadAction(@NotNull ProgressIndicator indicator) throws ProcessCanceledException {
            return doExecute(file, offset);
          }

          @Override
          public void onCanceled(@NotNull ProgressIndicator indicator) {
            LOG.debug("Highlighting was cancelled");
          }
        }));
    }

    @Nullable